k="KEY"
timer=2
for i in $(/usr/bin/seq ${1:-$timer} -1 0); do
    printf "\rHit any key to stop initsys: %s " "$i"
    read -t 1 -rsn1 k
    if [ "$k" != "KEY" ]; then
       break
    fi
done
printf "\n"
[ "$k" != "KEY" ] && exit 0
